package com.ss.android.article.base.feature.video.cdn.data;

public class SSCdnIpItem {
    public static final int RANK_BAD_GRADLE = 500;
    public static final int RANK_FINE_GRADLE = 10;
    public static final int RANK_MIDDLE_GRADLE = 25;
    public static final int RANK_SLOW_GRADLE = 100;
    public String ipAddress;
    public String ipCdnUrl;
    public long ipCostTime;
    public String ipHostName;
    public int ipRank;
    public boolean isSuccess;

    public SSCdnIpItem() {

        this.isSuccess = false;
        this.ipAddress = "";
        this.ipHostName = "";
        this.ipCdnUrl = "";
        this.ipCostTime = 0;
        this.ipRank = 500;
    }

    public void setIpRank() {
        long v2 = 200;
        if(!this.isSuccess) {
            this.ipRank = 500;
        }
        else if(this.ipCostTime < v2) {
            this.ipRank = 10;
        }
        else {
            if(this.ipCostTime >= v2 && this.ipCostTime < 1500) {
                this.ipRank = 25;
                return;
            }

            this.ipRank = 100;
        }
    }
}

